home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / MPW IIGS Interfaces / PIIGSIncludes / AppleTalk.p < prev    next >
Encoding:
Text File  |  1990-08-01  |  46.8 KB  |  1,339 lines  |  [TEXT/MPS ]

  1. {********************************************
  2. ; File: AppleTalk.p
  3. ;
  4. ;
  5. ; Copyright Apple Computer, Inc. 1986-90
  6. ; All Rights Reserved
  7. ;
  8. ********************************************}
  9.  
  10. UNIT APPLETALK;
  11.  
  12. INTERFACE
  13.  
  14. USES TYPES;
  15.  
  16. CONST
  17. { Command Numbers }
  18. atGetInfoCommand = $0002;
  19. atGetGlobalCommand = $0003;
  20. atInstallTimerCommand = $0004;
  21. atRemoveTimerCommand = $0005;
  22. atBootCommand = $0006;
  23. atCancelTimerCommand = $0045;
  24.  
  25. { Link Access Protocol Codes }
  26. lapWriteCommand = $0007;
  27. lapReadBufferCommand = $0008;
  28. lapAttachProtCommand = $0009;
  29. lapRemoveProtCommand = $000A;
  30.  
  31. { Datagram Delivery Protocol Codes }
  32. ddpOpenSocketCommand = $000B;
  33. ddpCloseSocketCommand = $000C;
  34. ddpSendDatagramCommand = $000D;
  35.  
  36. { Name Binding Protocol Codes }
  37. nbpRegisterNameCommand = $000E;
  38. nbpRemoveNameCommand = $000F;
  39. nbpLookupNameCommand = $0010;
  40. nbpConfirmNameCommand = $0011;
  41. nbpKillCommand = $0046;
  42.  
  43. { AppleTalk Transaction Protocol Codes }
  44. atpSendReqCommand = $0012;
  45. atpCancelReqCommand = $0013;
  46. atpOpenSocketCommand = $0014;
  47. atpCloseSocketCommand = $0015;
  48. atpGetReqCommand = $0016;
  49. atpSendRespCommand = $0017;
  50. atpRelCBCommand = $0019;
  51.  
  52. { Zone Information Protocol Codes }
  53. zipGetMyZoneCommand = $001A;
  54. zipGetZoneListCommand = $001B;
  55.  
  56. { AppleTalk Session Protocol Codes }
  57. aspGetParmsCommand = $001C;
  58. aspGetStatusCommand = $001D;
  59. aspOpenSessionCommand = $001E;
  60. aspCloseSessionCommand = $001F;
  61. aspCommandCommand = $0020;
  62. aspWriteCommand = $0021;
  63.  
  64. { Printer Access Protocol Codes }
  65. papStatusCommand = $0022;
  66. papOpenCommand = $0023;
  67. papCloseCommand = $0024;
  68. papReadCommand = $0025;
  69. papWriteCommand = $0026;
  70. papUnloadCommand = $0027;
  71.  
  72. { Remote Print Manager Codes }
  73. rpmSetPrinterCommand = $0028;
  74. rpmCloseSessionCommand = $0047;
  75. rpmFlushSessionCommand = $0048;
  76.  
  77. { ProDOS Filing Interface Codes }
  78. pfiUserPrefixCommand = $002A;
  79. pfiLoginCommand = $002B;
  80. pfiLoginContCommand = $002C;
  81. pfiLogOutCommand = $002D;
  82. pfiMountVolCommand = $002E;
  83. pfiListSessionsCommand = $002F;
  84. pfiTimeZoneCommand = $0030;
  85. pfiGetSrcPathCommand = $0031;
  86. pfiAccessCommand = $0032;
  87. pfiNamingCommand = $0033;
  88. pfiConvertTimeCommand = $0034;
  89. pfiSetBufferCommand = $0036;
  90. pfiHooksCommand = $0037;
  91. pfiLogin2Command = $0038;
  92. pfiListSessions2Command = $0039;
  93. pfiGetSVersionCommand = $003A;
  94.  
  95. { Error Codes }
  96. appleTalkNetError = $8888; { AppleTalk Network Error }
  97. atInvalidCmdErr = $0101;  { Invalid command }
  98. atMemoryErr = $0102;  { Heap/memory management error }
  99. atTimerNotInstalledErr = $0103;  { No timer installed error }
  100. atSyncErr = $0104;  { Syncronous only call }
  101. atTooManyTimes = $0105;  { Too many times }
  102. atTimerCancelled = $0106;
  103.  
  104. { LAP Error Codes }
  105. lapNoPacketErr = $0201;  { No packet in buffer }
  106. lapEOBErr = $0202;  { End of buffer }
  107. lapLenErr = $0203;  { LAP data too large }
  108. lapFailedErr = $0204;  { Retry count exhausted }
  109. lapTypeErr = $0205;  { Illegal LAP type }
  110. lapDuplicateErr = $0206;  { Duplicate LAP type }
  111. lapProtocolErr = $0207;  { Too many protocols }
  112. lapTypeFoundErr = $0208;  { Type not found }
  113. lapDataLostErr = $0209;  { Data lost in Purge }
  114.  
  115. { DDP Error Codes }
  116. ddpSktNumErr = $0301;  { Too many sockets open }
  117. ddpSktErr = $0302;  { Socket not open }
  118. ddpSktOpenErr = $0303;  { Socket already open }
  119. ddpSktTypeErr = $0304;  { Invalid Socket Type }
  120. ddpLenErr = $0305;  { DDP length error }
  121. ddpBridgeErr = $0306;  { No bridge available }
  122.  
  123. { NBP Error Codes }
  124. nbpNameNumberErr = $0401;  { Too many names }
  125. nbpNameExistErr = $0402;  { Name already exists }
  126. nbpNameFoundErr = $0403;  { Name not found }
  127. nbpBufferErr = $0404;  { User buffer full }
  128. nbpWildcardErr = $0405;  { Wildcard not allowed }
  129. nbpNameErr = $0406;  { Invalid name format }
  130. nbpAddressErr = $0407;  { Incorrect address }
  131. nbpProcessErr = $0408;  { Too many NBP processes }
  132. nbpAbortErr = $0409;  { NBP Aborted }
  133. nbpParmBlkNotFndErr = $040A;  { NBP Param Block not found }
  134.  
  135. { ATP Error Codes }
  136. atpDataLenErr = $0501;  { ATP data too large }
  137. atpSocketErr = $0502;  { Invalid ATP socket }
  138. atpControlBlkErr = $0503;  { ATP control block not found }
  139. atpProcessErr = $0504;  { Too many active ATP calls }
  140. atpReleaseErr = $0505;  { No release received }
  141. atpNoRespActive = $0506;  { No response active }
  142. atpRespErr = $0507;  { No send response active }
  143. atpReqErr = $0508;  { ATP send request aborted }
  144. atpSktClosedErr = $0509;  { socket closed error }
  145. atpTooManySkts = $050A;  { Too many ATP sockets }
  146. atpTooManyResp = $050B;  { Too many responses expected }
  147. atpDDPSktErr = $050C;  { Unable to open DDP socket }
  148. atpSndRespRelErr = $050D;  { ATP Send Response was released }
  149.  
  150. { ZIP Error Codes }
  151. zipNetworkErr = $0601;  { Network error }
  152. zipOverflow = $0602;  { ZIP overflow }
  153. zipNotFound = $0603;  { ZIP not found }
  154.  
  155. { ASP Error Codes }
  156. aspNetworkErr = $0701;  { Network error }
  157. aspSessNumErr = $0702;  { Too many sessions }
  158. aspRefErr = $0703;  { Invalid reference number }
  159. aspSizeErr = $0704;  { Size error }
  160. aspBufErr = $0705;  { Buffer error }
  161. aspNoRespErr = $0706;  { No response from server }
  162. aspBadVersion = $0707;  { Bad version number }
  163. aspTooManySessions = $0708;  { Too many sessions }
  164. aspServBusyErr = $0709;  { Server busy }
  165. aspSessionClosed = $070A;  { Session closed }
  166.  
  167. { PAP Error Codes }
  168. papSessNumErr = $0801;  { Too many sessions }
  169. papRefErr = $0802;  { Invalid Reference }
  170. papQuantumErr = $0803;  { Quantum Error }
  171. papCommandErr = $0804;  { Too many commands }
  172. papNameErr = $0805;  { Name not found }
  173. papSessionErr = $0806;  { Session closed }
  174. papNetworkErr = $0807;  { Network error }
  175. papServRespErr = $0808;  { Server not responding }
  176. papServBusyErr = $0809;  { Server busy }
  177. papBuffSizeErr = $080A;  { Buffer size error }
  178. papInUseErr = $080B;  { PAP in use }
  179.  
  180. { RPM Error Codes }
  181. rpmInvalidFlagErr = $0901;
  182. rpmInvalidTimeErr = $0902;
  183.  
  184. { PFI Error Codes }
  185. pfiTooManySessErr = $0A01;  { Too many sessions }
  186. pfiUnableOpenSessErr = $0A02;  { Unable to open session }
  187. pfiNoRespFrmSrvrErr = $0A03;  { No response from server }
  188. pfiLoginContErr = $0A04;  { Login continue }
  189. pfiInvalidNameErr = $0A05;  { Invalid name }
  190. pfiInvalidSessNumErr = $0A06;  { Invalid Sess reference # or unknown volume }
  191. pfiUnableOpenVolErr = $0A07;  { Unable to open volume }
  192. pfiTooManyVolsOpenErr = $0A08;  { Too many mounted volumes }
  193. pfiVolNotMountedErr = $0A09;  { Volume Not Mounted }
  194. pfiUnableSetCreatorErr = $0A0A;
  195. pfiBufferToSmallErr = $0A0B;  { Buffer to small }
  196. pfiTimeFlagErr = $0A0C;  { Time flag error }
  197. pfiUnableTSetGroupErr = $0A0D;  { Unable to set group }
  198. pfiDirNotFoundErr = $0A0E;  { Directory not found }
  199. pfiAccessDeniedErr = $0A0F;  { Access denied }
  200. pfiMiscellaneousErr = $0A10;  { Miscellaneous error }
  201. pfiVolAlreadyMntedErr = $0A11;  { Volume already mounted }
  202. pfiUnableGetCreatorErr = $0A12;  { Unable to get creator/group }
  203. pfiAlrdyLggedOnSrvrErr = $0A13;  { Already logged onto server }
  204. pfiTimeError = $0A14;  { Time error }
  205. pfiUserNotAuthorizedErr = $0A15;  { User not authorized }
  206. pfiParamterErr = $0A16;  { Parameter error }
  207. pfiSrvrGoingDownErr = $0A17;  { Server going down }
  208. pfiBadUAMErr = $0A18;  { Bad UAM }
  209. pfiBadVersionNumErr = $0A19;  { Bad version number }
  210.  
  211. { ATInit offsets }
  212. atInitUserName = $0085;
  213. atInitPrinterFlags = $0064;
  214. atInitPrinterTuple = $0063;
  215. atInitPrefix = $00C6;
  216. atInitPrefixDirID = $00CA;
  217. atInitPrefixVolID = $00CC;
  218. atInitPath = $010D;
  219. atInitPathDirID = $0111;
  220. atInitPathVolID = $0113;
  221.  
  222. { ATGetInfoRec.hardwareID flags }
  223. hidAppleIIGS = $0000;
  224.  
  225. { ATInstallTimerRec.ticksToComplete values  }
  226. atMaxTicks = $FFFF;
  227. atMaxTicksIIe = $1FFF;
  228.  
  229. { LAPReadBufferRec.purge values }
  230. lapPurgeOff = $0000;
  231. lapPurgeOn = $0001;
  232.  
  233. { DDPSendDatagramRec.checksum values }
  234. ddpChecksumOff = $00;
  235. {$IFC UNDEFINED ddpChecksumOn }
  236. ddpChecksumOn = $01;
  237. {$SETC ddpChecksumOn := 0}
  238. {$ENDC}
  239.  
  240. { NBPRegsterNameRec.checkFlag values }
  241. nbpCheckNameOn = $00;
  242. nbpCheckNameOff = $01;
  243.  
  244. {
  245.     ATPSendReqRec.atpFlags and 
  246.     ATPGetReqRec.atpFlags values
  247. }
  248.  
  249. atpExactlyOnceMask = $20;
  250.  
  251. { ATPSendReqRec.result value (low byte) }
  252. atpExecuting = $FF;
  253.  
  254. { ATPOpenSocketRec.socketID values }
  255. atpDynamicSocket = $00;
  256.  
  257. { ASPAttenHeaderRec.attenType values }
  258. aspAttenNormal = $00;
  259. {$IFC UNDEFINED aspAttenTimeout }
  260. aspAttenTimeout = $40;
  261. {$SETC aspAttenTimeout := 0}
  262. {$ENDC}
  263. aspAttenClosed = $80;
  264.  
  265. { RPMSetPrinterRec.timeOut values }
  266. {$IFC UNDEFINED rpmTimeOutOff }
  267. rpmTimeOutOff = $0000;
  268. {$SETC rpmTimeOutOff := 0}
  269. {$ENDC}
  270.  
  271. { RPMSetPrinterRec.rpmFlags masks }
  272. rpmNetworkMask = $80;
  273. rpmPostscriptMask = $20;
  274. {$IFC UNDEFINED rpmReturnNameMask }
  275. rpmReturnNameMask = $01;
  276. {$SETC rpmReturnNameMask := 0}
  277. {$ENDC}
  278.  
  279. { PFIMountVolRec.mountFlag masks }
  280. pfiMountMask = $80;
  281. {$IFC UNDEFINED pfiPasswordMask }
  282. pfiPasswordMask = $40;
  283. {$SETC pfiPasswordMask := 0}
  284. {$ENDC}
  285. {$IFC UNDEFINED pfiUserVolumeMask }
  286. pfiUserVolumeMask = $01;
  287. {$SETC pfiUserVolumeMask := 0}
  288. {$ENDC}
  289.  
  290. { PFITimeZoneRec.timeFlag masks }
  291. {$IFC UNDEFINED pfiEastWestMask }
  292. pfiEastWestMask = $80;
  293. {$SETC pfiEastWestMask := 0}
  294. {$ENDC}
  295. pfiHoursAwayMask = $7F;
  296.  
  297. { PFIAccessRec.directionalFlag masks }
  298. pfiSetAccessMask = $80;
  299. pfiCreatorMask = $40;
  300. pfiGroupMask = $20;
  301.  
  302. { PFINamingRec masks }
  303. pfiDNCMask = $80;  { PFI Directional Naming Convention Mask }
  304. pfiDDTMask = $40;  { PFI Directional Device Table Mask }
  305. pfiNNCMask = $80;  { PFI Naming Naming Convention Mask }
  306. pfiNDTMask = $40;  { PFI Naming Device Table Mask }
  307.  
  308. { LAPAttachProtRec.protType values }
  309. lapProtTypeMin = $01;
  310. lapProtTypeMax = $7F;
  311. lapProtTypeAll = $FF;
  312.  
  313. { Socket Range values }
  314. atpSocketDynamicMin = $80;
  315. atpSocketDynamicMax = $FE;
  316. atpSocketStaticMin = $01;
  317. atpSocketStaticMax = $7F;
  318.  
  319. { Buffer length constants }
  320. zipGetMyZoneBufLenMin = $21;
  321. papOpenStatusBufLenMin = $0104;
  322. pfiUserNameLenMax = $0040;
  323.  
  324. { Other misc constants }
  325. {$IFC UNDEFINED workstationGS }
  326. workstationGS = $0000;
  327. {$SETC workstationGS := 0}
  328. {$ENDC}
  329. endOfBDS = $FFFF;
  330. ddpInvalidClient = $00;
  331. atpActualLengthMask = $7FFF;
  332. atpActualLengthOvflw = $8000;
  333. atpUnusedAddRtnPtr = $00000000;
  334. atpUnusedAddBitMap = $00;
  335. pfiAFPVersion11 = $0101;
  336. pfiAFPVersion20 = $0200;
  337. pfiAFPTimeFormat = $0000;
  338. pfiProDOSTimeFormat = $0001;
  339. pfiHooksSetHooks = $40;
  340. pfiHooksP8Active = $80;
  341. pfiSetWriteBuffer = $80;
  342. papReadNotEOF = $00;
  343.  
  344. TYPE
  345. EntName = RECORD
  346.     buffer : PACKED ARRAY[1..99] OF Byte;
  347. END;
  348.  
  349. GetMyZoneBuf = PACKED ARRAY [1..zipGetMyZoneBufLenMin] of Byte;
  350. PAPOpenStatusBuf = PACKED ARRAY [1..papOpenStatusBufLenMin] of Byte;
  351. PFIUserName = PACKED ARRAY [1..pfiUserNameLenMax] of Byte;
  352.  
  353. ATInitTailRecHndl = ^ATInitTailRecPtr;
  354. ATInitTailRecPtr = ^ATInitTailRec;
  355. ATInitTailRec = PACKED RECORD
  356.     pathVolID : Integer;
  357.     pathDirID : Longint;
  358.     path : PACKED ARRAY[1..65] OF CHAR;
  359.     prefixVolID : Integer;
  360.     prefixDirID : Longint;
  361.     prefix : PACKED ARRAY[1..65] OF CHAR;
  362.     userName : PACKED ARRAY[1..33] OF CHAR;
  363.     printerFlags : Byte;
  364.     printerTuple : PACKED ARRAY[1..99] OF Byte;
  365. END;
  366.  
  367. ATGetInfoRecHndl = ^ATGetInfoRecPtr;
  368. ATGetInfoRecPtr = ^ATGetInfoRec;
  369. ATGetInfoRec = PACKED RECORD
  370.     async : Byte;
  371.     command : Byte;
  372.     result : Integer;
  373.     completionRtn : Longint;
  374.     thisNet : Integer;
  375.     aBridge : Byte;
  376.     hardwareID : Byte;
  377.     romVersion : Integer;
  378.     nodeNumber : Byte;
  379. END;
  380.  
  381. ATGetGlobalRecHndl = ^ATGetGlobalRecPtr;
  382. ATGetGlobalRecPtr = ^ATGetGlobalRec;
  383. ATGetGlobalRec = PACKED RECORD
  384.     async : Byte;
  385.     command : Byte;
  386.     result : Integer;
  387.     bufferPtr : Ptr;
  388. END;
  389.  
  390. ATGetGlobalBufferHndl = ^ATGetGlobalBufferPtr;
  391. ATGetGlobalBufferPtr = ^ATGetGlobalBuffer;
  392. ATGetGlobalBuffer = PACKED RECORD
  393.     destinationNode : Byte;
  394.     lapSourceNode : Byte;
  395.     lapType : Byte;
  396.     hopCountDL : Byte;
  397.     datagramLength : Byte;
  398.     ddpChecksum : Integer;
  399.     destNetwork : Integer;
  400.     sourceNetwork : Integer;
  401.     destinationNode : Byte;
  402.     sourceNode : Byte;
  403.     destinationSocket : Byte;
  404.     sourceSocket : Byte;
  405.     ddpType : Byte;
  406.     packetLength : Integer;
  407. END;
  408.  
  409. ATInstallTimerRecHndl = ^ATInstallTimerRecPtr;
  410. ATInstallTimerRecPtr = ^ATInstallTimerRec;
  411. ATInstallTimerRec = PACKED RECORD
  412.     async : Byte;
  413.     command : Byte;
  414.     result : Integer;
  415.     completionRtn : Longint;
  416.     runningTickCount : Integer;
  417.     ticksToComplete : Integer;
  418.     reserved : Ptr;
  419. END;
  420.  
  421. ATRemoveTimerRecHndl = ^ATRemoveTimerRecPtr;
  422. ATRemoveTimerRecPtr = ^ATRemoveTimerRec;
  423. ATRemoveTimerRec = PACKED RECORD
  424.     async : Byte;
  425.     command : Byte;
  426.     result : Integer;
  427.     reserved : PACKED ARRAY[1..12] OF Byte;
  428. END;
  429.  
  430. ATBootRecHndl = ^ATBootRecPtr;
  431. ATBootRecPtr = ^ATBootRec;
  432. ATBootRec = PACKED RECORD
  433.     async : Byte;
  434.     command : Byte;
  435.     result : Integer;
  436. END;
  437.  
  438. ATCancelTimerRecHndl = ^ATCancelTimerRecPtr;
  439. ATCancelTimerRecPtr = ^ATCancelTimerRec;
  440. ATCancelTimerRec = PACKED RECORD
  441.     async : Byte;
  442.     command : Byte;
  443.     result : Integer;
  444.     reserved : PACKED ARRAY[1..12] OF Byte;
  445. END;
  446.  
  447. ASPAttentionHeaderRecHndl = ^ASPAttentionHeaderRecPtr;
  448. ASPAttentionHeaderRecPtr = ^ASPAttentionHeaderRec;
  449. ASPAttentionHeaderRec = PACKED RECORD
  450.     sessionRefNum : Byte;
  451.     attenType : Byte;
  452.     atten : Integer;
  453. END;
  454.  
  455. ASPGetParmsRecHndl = ^ASPGetParmsRecPtr;
  456. ASPGetParmsRecPtr = ^ASPGetParmsRec;
  457. ASPGetParmsRec = PACKED RECORD
  458.     async : Byte; { asyncronous flag }
  459.     command : Byte; { PAP command to execute }
  460.     result : Integer; { error result from a PAP operation }
  461.     maxCmdSize : Integer;
  462.     maxDataSize : Integer;
  463. END;
  464.  
  465. ASPGetStatusRecHndl = ^ASPGetStatusRecPtr;
  466. ASPGetStatusRecPtr = ^ASPGetStatusRec;
  467. ASPGetStatusRec = PACKED RECORD
  468.     async : Byte; { asyncronous flag }
  469.     command : Byte; { PAP command to execute }
  470.     result : Integer; { error result from a PAP operation }
  471.     completionPtr : Longint; { pointer to the completion routine }
  472.     slsNet : Integer; { SLS Network Number }
  473.     slsNode : Byte; { SLS Node Number }
  474.     slsSocket : Byte; { SLS Socket Number }
  475.     bufferLength : Integer; { Buffer Length }
  476.     bufferAddr : Longint; { Buffer Address }
  477.     dataLength : Integer; { Length of Status Data }
  478. END;
  479.  
  480. ASPOpenSessionRecHndl = ^ASPOpenSessionRecPtr;
  481. ASPOpenSessionRecPtr = ^ASPOpenSessionRec;
  482. ASPOpenSessionRec = PACKED RECORD
  483.     async : Byte; { asyncronous flag }
  484.     command : Byte; { PAP command to execute }
  485.     result : Integer; { error result from a PAP operation }
  486.     completionPtr : Longint; { pointer to the completion routine }
  487.     slsNet : Integer; { SLS Network Number }
  488.     slsNode : Byte; { SLS Node Number }
  489.     slsSocket : Byte; { SLS Socket Number }
  490.     attnRtnAddr : Longint; { Attention Routine Addr }
  491.     refNum : Byte; { Session Reference Number }
  492. END;
  493.  
  494. ASPCloseSessionRecHndl = ^ASPCloseSessionRecPtr;
  495. ASPCloseSessionRecPtr = ^ASPCloseSessionRec;
  496. ASPCloseSessionRec = PACKED RECORD
  497.     async : Byte; { asyncronous flag }
  498.     command : Byte; { PAP command to execute }
  499.     result : Integer; { error result from a PAP operation }
  500.     completionPtr : Longint; { pointer to the completion routine }
  501.     refNum : Byte; { Session Reference Number }
  502. END;
  503.  
  504. ASPCommandRecHndl = ^ASPCommandRecPtr;
  505. ASPCommandRecPtr = ^ASPCommandRec;
  506. ASPCommandRec = PACKED RECORD
  507.     async : Byte; { asyncronous flag }
  508.     command : Byte; { PAP command to execute }
  509.     result : Integer; { error result from a PAP operation }
  510.     completionPtr : Longint; { pointer to the completion routine }
  511.     refNum : Byte; { Session Reference Number }
  512.     cmdBlkLength : Integer; { Command Block Length }
  513.     cmdBlkAddr : Longint; { Command Block Address }
  514.     replyBufferLen : Integer; { Reply Buffer Length }
  515.     replyBufferAddr : Longint; { Reply Buffer Address }
  516.     cmdResult : Longint; { Command Result }
  517.     replyLength : Integer; { Reply Length }
  518. END;
  519.  
  520. ASPWriteRecHndl = ^ASPWriteRecPtr;
  521. ASPWriteRecPtr = ^ASPWriteRec;
  522. ASPWriteRec = PACKED RECORD
  523.     async : Byte; { asyncronous flag }
  524.     command : Byte; { PAP command to execute }
  525.     result : Integer; { error result from a PAP operation }
  526.     completionPtr : Longint; { pointer to the completion routine }
  527.     refNum : Byte; { Session Reference Number }
  528.     cmdBlkLength : Integer; { Command Block Length }
  529.     cmdBlkAddr : Longint; { Command Block Address }
  530.     writeDataLength : Integer; { Write Data Length }
  531.     writeDataAddr : Longint; { Write Data Address }
  532.     replyBufferLen : Integer; { Reply Buffer Length }
  533.     replyBufferAddr : Longint; { Reply Buffer Address }
  534.     cmdResult : Longint; { Command Result }
  535.     writtenLength : Integer; { Written Length }
  536.     replyLength : Integer; { Reply Length }
  537. END;
  538.  
  539. ServerHndl = ^ServerPtr;
  540. ServerPtr = ^Server;
  541. Server = PACKED RECORD
  542.     serverName : Ptr; { Pointer to a Server Entity }
  543.     net : Integer; { Net of the server }
  544.     node : Byte; { Node of the server }
  545.     socket : Byte; { Socket number of the server }
  546. END;
  547.  
  548. ATPSendReqRecHndl = ^ATPSendReqRecPtr;
  549. ATPSendReqRecPtr = ^ATPSendReqRec;
  550. ATPSendReqRec = PACKED RECORD
  551.     async : Byte; { asyncronous flag }
  552.     command : Byte; { ATP command to execute }
  553.     result : Integer; { error result from the ATP operation }
  554.     completionPtr : Longint; { pointer to the completion routine }
  555.     socketID : Byte; { dynamic socket number }
  556.     destNetID : Integer; { destination network # }
  557.     destNodeID : Byte; { destination node # }
  558.     destSocketID : Byte; { destination socket # }
  559.     transactionID : Integer; { transaction ID # }
  560.     reqBufferLength : Integer; { request buffer length }
  561.     reqBufferPtr : Longint; { pointer to the request buffer }
  562.     userBytes : Longint; { user BYTEs }
  563.     numberRespBuffers : Byte; { number of response buffers }
  564.     respBufferPtr : Longint; { pointer to the response buffer }
  565.     atpFlags : Byte; { flags for ATP transaction }
  566.     rInterval : Byte; { timeout before retrying }
  567.     rCount : Byte; { number of retries to attempt }
  568.     bitMap : Byte; { bitmap indicating for packet reception }
  569.     responseRcv : Byte; { number of responses received }
  570.     reserved : Byte; { reserved for future use }
  571. END;
  572.  
  573. ATPCancelReqRecHndl = ^ATPCancelReqRecPtr;
  574. ATPCancelReqRecPtr = ^ATPCancelReqRec;
  575. ATPCancelReqRec = PACKED RECORD
  576.     async : Byte; { asyncronous flag }
  577.     command : Byte; { ATP command to execute }
  578.     result : Integer; { error result from ATP operation }
  579.     transactionID : Integer; { transaction ID # }
  580. END;
  581.  
  582. ATPOpenSocketRecHndl = ^ATPOpenSocketRecPtr;
  583. ATPOpenSocketRecPtr = ^ATPOpenSocketRec;
  584. ATPOpenSocketRec = PACKED RECORD
  585.     async : Byte; { asyncronous flag }
  586.     command : Byte; { ATP command to execute }
  587.     result : Integer; { error result from the ATP operation }
  588.     socketID : Byte; { socket number to open }
  589. END;
  590.  
  591. ATPCloseSocketRecHndl = ^ATPCloseSocketRecPtr;
  592. ATPCloseSocketRecPtr = ^ATPCloseSocketRec;
  593. ATPCloseSocketRec = PACKED RECORD
  594.     async : Byte; { asyncronous flag }
  595.     command : Byte; { ATP command to execute }
  596.     result : Integer; { error result from ATP operation }
  597.     socketID : Byte; { socket number for closing }
  598. END;
  599.  
  600. ATPGetReqRecHndl = ^ATPGetReqRecPtr;
  601. ATPGetReqRecPtr = ^ATPGetReqRec;
  602. ATPGetReqRec = PACKED RECORD
  603.     async : Byte; { asyncronous flag }
  604.     command : Byte; { ATP command to execute }
  605.     result : Integer; { error result from ATP operation }
  606.     completionPtr : Longint; { pointer to the completion routine }
  607.     respSocketID : Byte; { response socket # }
  608.     networkID : Integer; { source network # }
  609.     nodeID : Byte; { source node # }
  610.     socketID : Byte; { source socket # }
  611.     transactionID : Integer; { ATP transaction ID }
  612.     reqBufferLength : Integer; { request buffer length }
  613.     reqBufferPtr : Longint; { pointer to request buffer }
  614.     userBytes : Longint; { user BYTEs }
  615.     requestLength : Integer; { actual request length }
  616.     atpFlags : Byte; { ATP operation flags }
  617.     bitMap : Byte; { bitmap for packet reception }
  618.     reserved : Longint; { reserved for future use }
  619. END;
  620.  
  621. ATPSendRespRecHndl = ^ATPSendRespRecPtr;
  622. ATPSendRespRecPtr = ^ATPSendRespRec;
  623. ATPSendRespRec = PACKED RECORD
  624.     async : Byte; { asyncronous flag }
  625.     command : Byte; { ATP command to execute }
  626.     result : Integer; { result to the ATP operation }
  627.     completionPtr : Longint; { pointer to the completion routine }
  628.     socketID : Byte; { response socket # }
  629.     destNetID : Integer; { destination network # }
  630.     destNodeID : Byte; { destination node # }
  631.     destSocketID : Byte; { destination socket # }
  632.     transactionID : Integer; { transaction ID # }
  633.     numRespBuffers : Byte; { number of response buffers }
  634.     totalPackets : Byte; { total ATP packets }
  635.     respBDSPtr : Longint; { pointer to the BDS buffer }
  636.     atpFlags : Byte; { ATP operation flags }
  637.     bitmap : Byte; { bitmap for packet reception }
  638.     reserved : Longint; { must be set to NIL for future compatibility }
  639.     reserved2 : Byte; { must be set to 0 for future compatibility }
  640. END;
  641.  
  642. ATPRelCBRecHndl = ^ATPRelCBRecPtr;
  643. ATPRelCBRecPtr = ^ATPRelCBRec;
  644. ATPRelCBRec = PACKED RECORD
  645.     async : Byte; { asyncronous flag }
  646.     command : Byte; { ATP command to execute }
  647.     result : Integer; { error result to the ATP operation }
  648.     socketID : Byte; { response socket # }
  649.     destNetID : Integer; { destination network # }
  650.     destNodeID : Byte; { destination node # }
  651.     destSocketID : Byte; { destination socket # }
  652.     transactionID : Integer; { ATP transaction ID }
  653. END;
  654.  
  655. RespBDSBufferHndl = ^RespBDSBufferPtr;
  656. RespBDSBufferPtr = ^RespBDSBuffer;
  657. RespBDSBuffer = RECORD
  658.     bufferLength : Integer;
  659.     bufferPtr : Longint;
  660.     userBytes : Longint;
  661.     actualLength : Integer;
  662. END;
  663.  
  664. DDPOpenSocketRecHndl = ^DDPOpenSocketRecPtr;
  665. DDPOpenSocketRecPtr = ^DDPOpenSocketRec;
  666. DDPOpenSocketRec = PACKED RECORD
  667.     async : Byte; { asyncronous flag }
  668.     command : Byte; { DDP command to execute }
  669.     result : Integer; { error result from DDP operation }
  670.     socketNumber : Byte; { socket number opened }
  671.     clientAddr : Longint; { client address }
  672. END;
  673.  
  674. DDPCloseSocketRecHndl = ^DDPCloseSocketRecPtr;
  675. DDPCloseSocketRecPtr = ^DDPCloseSocketRec;
  676. DDPCloseSocketRec = PACKED RECORD
  677.     async : Byte; { asyncronous flag }
  678.     command : Byte; { DDP commnd to execute }
  679.     result : Integer; { error result from DDP operation }
  680.     socketNumber : Byte; { socket # to close }
  681. END;
  682.  
  683. DDPSendDatagramRecHndl = ^DDPSendDatagramRecPtr;
  684. DDPSendDatagramRecPtr = ^DDPSendDatagramRec;
  685. DDPSendDatagramRec = PACKED RECORD
  686.     async : Byte; { asyncronous flag }
  687.     command : Byte; { DDP command to execute }
  688.     result : Integer; { error result from DDP operation }
  689.     checksum : Byte; { calculated checksum }
  690.     destNet : Integer; { destination network # }
  691.     destNode : Byte; { destination node # }
  692.     destSocket : Byte; { destination socket # }
  693.     sourceSocket : Byte; { DDP socket to send from }
  694.     ddpType : Byte; { DDP protocol type }
  695.     bdsPtr : Longint; { pointer to the DDP BDS buffer }
  696. END;
  697.  
  698. LAPWriteRecHndl = ^LAPWriteRecPtr;
  699. LAPWriteRecPtr = ^LAPWriteRec;
  700. LAPWriteRec = PACKED RECORD
  701.     async : Byte; { asyncronous flag }
  702.     command : Byte; { lap command to execute }
  703.     result : Integer; { lap error result code }
  704.     destNode : Byte; { destination node to send packet to }
  705.     lapType : Byte; { lap protocol type to send }
  706.     lapBDSPtr : Longint; { pointer to the lap BDS buffer }
  707. END;
  708.  
  709. LAPReadBufferRecHndl = ^LAPReadBufferRecPtr;
  710. LAPReadBufferRecPtr = ^LAPReadBufferRec;
  711. LAPReadBufferRec = PACKED RECORD
  712.     async : Byte; { asyncronous flag }
  713.     command : Byte; { LAP command to execute }
  714.     result : Integer; { error result of the LAP operation }
  715.     requestCount : Integer; { how many BYTEs to transfer }
  716.     bufferPtr : Longint; { pointer to a buffer to store info }
  717.     purge : Byte; { flag for purging the buffer if wrong size }
  718.     amountTransfered : Integer; { actual amount transfered }
  719. END;
  720.  
  721. LAPAttachProtRecHndl = ^LAPAttachProtRecPtr;
  722. LAPAttachProtRecPtr = ^LAPAttachProtRec;
  723. LAPAttachProtRec = PACKED RECORD
  724.     async : Byte; { asyncronous flag }
  725.     command : Byte; { LAP command to execute }
  726.     result : Integer; { error result of LAP operation }
  727.     protType : Byte; { protocol type specifing the LAP type }
  728.     protAddr : Longint; { protocol address specifing the LAP handler }
  729. END;
  730.  
  731. LAPRemoveProtRecHndl = ^LAPRemoveProtRecPtr;
  732. LAPRemoveProtRecPtr = ^LAPRemoveProtRec;
  733. LAPRemoveProtRec = PACKED RECORD
  734.     async : Byte; { asyncronous flag }
  735.     command : Byte; { LAP command to execute }
  736.     result : Integer; { error result of LAP operation }
  737.     protType : Byte; { protocol type specifing the LAP type }
  738. END;
  739.  
  740. BDSHndl = ^BDSPtr;
  741. BDSPtr = ^BDS;
  742. BDS = RECORD
  743.     BufferLength : Integer;
  744.     BufferPtr : Longint;
  745. END;
  746.  
  747. NBPRNEntityNameRecHndl = ^NBPRNEntityNameRecPtr;
  748. NBPRNEntityNameRecPtr = ^NBPRNEntityNameRec;
  749. NBPRNEntityNameRec = RECORD
  750.     reserved : PACKED ARRAY[1..9] OF Byte;
  751.     entityName : EntName;
  752. END;
  753.  
  754. NBPLUNameBufferRecHndl = ^NBPLUNameBufferRecPtr;
  755. NBPLUNameBufferRecPtr = ^NBPLUNameBufferRec;
  756. NBPLUNameBufferRec = PACKED RECORD
  757.     netNum : Integer;
  758.     nodeNum : Byte;
  759.     socketNum : Byte;
  760.     enumerator : Byte;
  761.     entityName : EntName;
  762. END;
  763.  
  764. NBPRegisterNameRecHndl = ^NBPRegisterNameRecPtr;
  765. NBPRegisterNameRecPtr = ^NBPRegisterNameRec;
  766. NBPRegisterNameRec = PACKED RECORD
  767.     async : Byte; { asyncronous flag }
  768.     command : Byte; { NBP command to execute }
  769.     result : Integer; { error result from NBP operation }
  770.     completionPtr : Longint; { pointer to the completion routine }
  771.     namePtr : Longint; { pointer to the entityType }
  772.     rInterval : Byte; { timeOut period before retrying }
  773.     rCount : Byte; { number of retries to attempt }
  774.     reserved : Integer; { reserved for future use }
  775.     socketNumber : Byte; { socket listner being registered }
  776.     checkFlag : Byte; { flag for checking duplicate names }
  777. END;
  778.  
  779. NBPRemoveNameRecHndl = ^NBPRemoveNameRecPtr;
  780. NBPRemoveNameRecPtr = ^NBPRemoveNameRec;
  781. NBPRemoveNameRec = PACKED RECORD
  782.     async : Byte; { asyncronous flag }
  783.     command : Byte; { NBP command to execute }
  784.     result : Integer; { error result from NBP operation }
  785.     entityPtr : Longint; { pointer to the entity entityType }
  786. END;
  787.  
  788. NBPLookupNameRecHndl = ^NBPLookupNameRecPtr;
  789. NBPLookupNameRecPtr = ^NBPLookupNameRec;
  790. NBPLookupNameRec = PACKED RECORD
  791.     async : Byte; { asyncronous flag }
  792.     command : Byte; { NBP command to execute }
  793.     result : Integer; { error result from NBP operation }
  794.     completionPtr : Longint; { pointer to the completion routine }
  795.     entityPtr : Longint; { pointer to the entity entityType }
  796.     rInterval : Byte; { timeout interval before retrying }
  797.     rCount : Byte; { number of retries to attempt }
  798.     reserved : Integer; { reserved for future use }
  799.     bufferLength : Integer; { length of the user buffer }
  800.     bufferPtr : Longint; { pointer to the user buffer }
  801.     maxMatch : Byte; { maxiumn number of name matches }
  802.     actualMatch : Byte; { actual number of matches }
  803. END;
  804.  
  805. NBPConfirmNameRecHndl = ^NBPConfirmNameRecPtr;
  806. NBPConfirmNameRecPtr = ^NBPConfirmNameRec;
  807. NBPConfirmNameRec = PACKED RECORD
  808.     async : Byte; { asyncronous flag }
  809.     command : Byte; { NBP command to execute }
  810.     result : Integer; { error result from NBP operation }
  811.     completionPtr : Longint; { pointer to the completion routine }
  812.     entityPtr : Longint; { pointer to the entity name }
  813.     rInterval : Byte; { timeout interval before retrying }
  814.     rCount : Byte; { number of retries to attempt }
  815.     reserved : Integer; { reserved for future use }
  816.     networkID : Integer; { network number for confirmation }
  817.     nodeID : Byte; { node number for confirmation }
  818.     socketID : Byte; { socket number for confirmation }
  819.     actualSocketID : Byte; { actual socket number confirmed }
  820. END;
  821.  
  822. NBPKillRecHndl = ^NBPKillRecPtr;
  823. NBPKillRecPtr = ^NBPKillRec;
  824. NBPKillRec = PACKED RECORD
  825.     async : Byte;
  826.     command : Byte;
  827.     result : Integer;
  828.     paramBlockPtr : Ptr;
  829. END;
  830.  
  831. PAPStatusRecHndl = ^PAPStatusRecPtr;
  832. PAPStatusRecPtr = ^PAPStatusRec;
  833. PAPStatusRec = PACKED RECORD
  834.     async : Byte; { asyncronous flag }
  835.     command : Byte; { PAP command to execute }
  836.     result : Integer; { error result from a PAP operation }
  837.     completionPtr : Longint; { pointer to the completion routine }
  838.     printerNamePtr : Longint; { pointer to the printer name }
  839.     statusBufferPtr : Longint; { pointer to the status buffer }
  840. END;
  841.  
  842. PAPOpenRecHndl = ^PAPOpenRecPtr;
  843. PAPOpenRecPtr = ^PAPOpenRec;
  844. PAPOpenRec = PACKED RECORD
  845.     async : Byte; { asyncronous flag }
  846.     command : Byte; { PAP command to execute }
  847.     result : Integer; { error result from a PAP operation }
  848.     completionPtr : Longint; { pointer to the completion routine }
  849.     sessRefID : Byte; { session reference number }
  850.     printerNamePtr : Longint; { printer name pointer }
  851.     flowQuantum : Byte; { number of ATP packets to be sent }
  852.     statusBufferPtr : Longint; { pointer to the status buffer }
  853. END;
  854.  
  855. PAPCloseRecHndl = ^PAPCloseRecPtr;
  856. PAPCloseRecPtr = ^PAPCloseRec;
  857. PAPCloseRec = PACKED RECORD
  858.     async : Byte; { asyncronous flag }
  859.     command : Byte; { PAP command to execute }
  860.     result : Integer; { error result from a PAP operation }
  861.     completionPtr : Longint; { pointer to the completion routine }
  862.     sessRefID : Byte; { session referance number }
  863. END;
  864.  
  865. PAPReadRecHndl = ^PAPReadRecPtr;
  866. PAPReadRecPtr = ^PAPReadRec;
  867. PAPReadRec = PACKED RECORD
  868.     async : Byte; { asyncronous flag }
  869.     command : Byte; { PAP command to execute }
  870.     result : Integer; { error result from a PAP operation }
  871.     completionPtr : Longint; { pointer to the completion routine }
  872.     sessRefID : Byte; { session reference # }
  873.     bufferLength : Integer; { length of the user buffer }
  874.     bufferPtr : Longint; { pointer to the user buffer }
  875.     papEOF : Byte; { end of file flag }
  876. END;
  877.  
  878. PAPWriteRecHndl = ^PAPWriteRecPtr;
  879. PAPWriteRecPtr = ^PAPWriteRec;
  880. PAPWriteRec = PACKED RECORD
  881.     async : Byte; { asyncronous flag }
  882.     command : Byte; { PAP command to execute }
  883.     result : Integer; { error result from a PAP operation }
  884.     completionPtr : Longint; { pointer to the completion routine }
  885.     sessRefID : Byte; { session reference # }
  886.     dataLength : Integer; { data length }
  887.     bufferPtr : Longint; { pointer to the buffer }
  888.     papEOF : Byte; { end of file flag }
  889. END;
  890.  
  891. PAPUnloadRecHndl = ^PAPUnloadRecPtr;
  892. PAPUnloadRecPtr = ^PAPUnloadRec;
  893. PAPUnloadRec = PACKED RECORD
  894.     async : Byte; { asyncronous flag }
  895.     command : Byte; { PAP command to execute }
  896.     result : Integer; { error result from a PAP operation }
  897.     completionPtr : Longint; { pointer to the completion routine }
  898. END;
  899.  
  900. PFIAttentionHeaderRecHndl = ^PFIAttentionHeaderRecPtr;
  901. PFIAttentionHeaderRecPtr = ^PFIAttentionHeaderRec;
  902. PFIAttentionHeaderRec = PACKED RECORD
  903.     sessionRefNum : Byte;
  904.     attenType : Byte;
  905.     atten : Integer;
  906.     serverName : PACKED ARRAY[1..33] OF CHAR;
  907.     zoneName : PACKED ARRAY[1..34] OF CHAR;
  908. END;
  909.  
  910. PFIHooksMountingRecHndl = ^PFIHooksMountingRecPtr;
  911. PFIHooksMountingRecPtr = ^PFIHooksMountingRec;
  912. PFIHooksMountingRec = PACKED RECORD
  913.     sessionRefNum : Byte;
  914.     p8UnitNum : Byte;
  915.     volumeName : PACKED ARRAY[1..29] OF CHAR;
  916.     volumeID : Integer;
  917.     serverName : PACKED ARRAY[1..33] OF CHAR;
  918.     zoneName : PACKED ARRAY[1..34] OF CHAR;
  919. END;
  920.  
  921. PFIUserPrefixRecHndl = ^PFIUserPrefixRecPtr;
  922. PFIUserPrefixRecPtr = ^PFIUserPrefixRec;
  923. PFIUserPrefixRec = PACKED RECORD
  924.     async : Byte; { asyncronous flag }
  925.     command : Byte; { PFI command to execute }
  926.     result : Integer; { error result from PFI operation }
  927.     directionFlag : Byte; { high bit set to point to by User Pointer is stored in PFI }
  928.     userNamePtr : Integer; { name pointed to my User Mane Pointer }
  929. END;
  930.  
  931. PFILoginRecHndl = ^PFILoginRecPtr;
  932. PFILoginRecPtr = ^PFILoginRec;
  933. PFILoginRec = PACKED RECORD
  934.     async : Byte; { asyncronous flag }
  935.     command : Byte; { PFI command to execute }
  936.     result : Integer; { error result from PFI operation }
  937.     networkID : Integer; { network number for confirmation }
  938.     nodeID : Byte; { node number for confirmation }
  939.     socketID : Byte; { socket number for confirmation }
  940.     cmdBufferLength : Integer; { length of the user command buffer }
  941.     cmdBufferPtr : Longint; { pointer to the user command buffer }
  942.     replyBufferLen : Integer; { length of the reply buffer }
  943.     replyBufferPtr : Longint; { pointer to the reply buffer }
  944.     sessRefID : Byte; { session reference number }
  945.     attnRtnAddr : Longint;
  946. END;
  947.  
  948. PFILoginContRecHndl = ^PFILoginContRecPtr;
  949. PFILoginContRecPtr = ^PFILoginContRec;
  950. PFILoginContRec = PACKED RECORD
  951.     async : Byte; { asyncronous flag }
  952.     command : Byte; { PFI command to execute }
  953.     result : Integer; { error result from PFI operation }
  954.     sessRefID : Byte; { session reference number }
  955.     cmdBufferLength : Integer; { length of the user command buffer }
  956.     cmdBufferPtr : Longint; { pointer to the user command buffer }
  957.     replyBufferLen : Integer; { length of the reply buffer }
  958.     replyBufferPtr : Longint; { pointer to the reply buffer }
  959. END;
  960.  
  961. PFILogoutRecHndl = ^PFILogoutRecPtr;
  962. PFILogoutRecPtr = ^PFILogoutRec;
  963. PFILogoutRec = PACKED RECORD
  964.     async : Byte; { asyncronous flag }
  965.     command : Byte; { PFI command to execute }
  966.     result : Integer; { error result from PFI operation }
  967.     sessRefID : Byte; { session reference number }
  968. END;
  969.  
  970. PFIMountvolRecHndl = ^PFIMountvolRecPtr;
  971. PFIMountvolRecPtr = ^PFIMountvolRec;
  972. PFIMountvolRec = PACKED RECORD
  973.     async : Byte; { asyncronous flag }
  974.     command : Byte; { PFI command to execute }
  975.     result : Integer; { error result from PFI operation }
  976.     sessRefID : Byte; { session reference number }
  977.     mountflag : Byte; { mount flag field specifies whether the vol is to be mounted }
  978.     volNamePtr : Longint; { pointer to the volume that will be pseudo-mounted }
  979.     volID : Integer; { volume ID returned by AFP }
  980.     slotDrive : Byte; { the slot/drive in ProDOS format into which the volume was pseudo-mounted }
  981.     passwordPtr : Longint; { pointer to password for the pseudo-mounted volume }
  982. END;
  983.  
  984. PFIListBufferRecHndl = ^PFIListBufferRecPtr;
  985. PFIListBufferRecPtr = ^PFIListBufferRec;
  986. PFIListBufferRec = PACKED RECORD
  987.     sessionRefNum : Byte;
  988.     Slot : Byte;
  989.     volumeName : PACKED ARRAY[1..28] OF Byte;
  990.     volumeID : Integer;
  991. END;
  992.  
  993. PFIListSessionsRecHndl = ^PFIListSessionsRecPtr;
  994. PFIListSessionsRecPtr = ^PFIListSessionsRec;
  995. PFIListSessionsRec = PACKED RECORD
  996.     async : Byte; { asyncronous flag }
  997.     command : Byte; { PFI command to execute }
  998.     result : Integer; { error result from PFI operation }
  999.     bufferLength : Integer; { length of the user buffer }
  1000.     bufferPtr : Longint; { pointer to the user buffer }
  1001.     entriesRtn : Byte; { contains the number of entries returned from the list of current sessions being maintained through the PFI and any volumes mounted for those sessions }
  1002. END;
  1003.  
  1004. PFITimeZoneRecHndl = ^PFITimeZoneRecPtr;
  1005. PFITimeZoneRecPtr = ^PFITimeZoneRec;
  1006. PFITimeZoneRec = PACKED RECORD
  1007.     async : Byte; { asyncronous flag }
  1008.     command : Byte; { PFI command to execute }
  1009.     result : Integer; { error result from PFI operation }
  1010.     timeFlag : Byte; { depending on bit set of the time falg field indicates whether the time should be added to or subtracted from the time zone selected }
  1011. END;
  1012.  
  1013. PFIGetSrcpathRecHndl = ^PFIGetSrcpathRecPtr;
  1014. PFIGetSrcpathRecPtr = ^PFIGetSrcpathRec;
  1015. PFIGetSrcpathRec = PACKED RECORD
  1016.     async : Byte; { asyncronous flag }
  1017.     command : Byte; { PFI command to execute }
  1018.     result : Integer; { error result from PFI operation }
  1019.     bufferPtr : Longint; { pointer to the user buffer where the pathname will be placed }
  1020. END;
  1021.  
  1022. PFIAccessRecHndl = ^PFIAccessRecPtr;
  1023. PFIAccessRecPtr = ^PFIAccessRec;
  1024. PFIAccessRec = PACKED RECORD
  1025.     async : Byte; { asyncronous flag }
  1026.     command : Byte; { PFI command to execute }
  1027.     result : Integer; { error result from PFI operation }
  1028.     directionalFlag : Byte; { if bit 7 of the directional flag is set, the access is being set }
  1029.     accessRights : Longint; { access rights in AFP format }
  1030.     pathnamePtr : Longint; { pointer the path name containing that volume }
  1031.     creatorNamePtr : Longint; { if bit 6 of the directional flag is set, the creator's name will be dealt with }
  1032.     groupNamePtr : Longint; { if bit 5 of the directional flag is set, the group name will be dealt with }
  1033. END;
  1034.  
  1035. PFINamingRecHndl = ^PFINamingRecPtr;
  1036. PFINamingRecPtr = ^PFINamingRec;
  1037. PFINamingRec = PACKED RECORD
  1038.     async : Byte; { asyncronous flag }
  1039.     command : Byte; { PFI command to execute }
  1040.     result : Integer; { error result from PFI operation }
  1041.     directionalFlag : Byte; { if bit 7 of the directional flag is set, the naming convention is being set }
  1042.     namingConvFlag : Byte; { if bit 7 of the naming convention flag is set, the naming convention becomes AFP format }
  1043. END;
  1044.  
  1045. PFIConvertTimeRecHndl = ^PFIConvertTimeRecPtr;
  1046. PFIConvertTimeRecPtr = ^PFIConvertTimeRec;
  1047. PFIConvertTimeRec = PACKED RECORD
  1048.     async : Byte; { asyncronous flag }
  1049.     command : Byte; { PFI command to execute }
  1050.     result : Integer; { error result from PFI operation }
  1051.     formatFlag : Byte; { if the format flag is set to 0, then from date time is AFP format  if the format flag is set to 1, then from date time is ProDOS format }
  1052.     fromDateTime : Longint; { this field contains the From DATE/Time data (values) to convert, not pointers }
  1053.     toDateTime : Longint; { this field contains the TO DATE/Time data (values) to convert, not pointers }
  1054. END;
  1055.  
  1056. PFISetBufferRecHndl = ^PFISetBufferRecPtr;
  1057. PFISetBufferRecPtr = ^PFISetBufferRec;
  1058. PFISetBufferRec = PACKED RECORD
  1059.     async : Byte; { asyncronous flag }
  1060.     command : Byte; { PFI command to execute }
  1061.     result : Integer; { error result from PFI operation }
  1062.     dirFlag : Byte; { $00 or $80 }
  1063.     bufferLength : Integer; { Buffer Length }
  1064.     bufferPtr : Longint; { if the format flag is set to 0, then from date time is AFP format }
  1065. END;
  1066.  
  1067. PFIHooksRecHndl = ^PFIHooksRecPtr;
  1068. PFIHooksRecPtr = ^PFIHooksRec;
  1069. PFIHooksRec = PACKED RECORD
  1070.     async : Byte;
  1071.     command : Byte;
  1072.     result : Integer;
  1073.     hookFlag : Byte;
  1074.     mountVector : Longint;
  1075.     unmountVector : Longint;
  1076.     attentionVector : Longint;
  1077. END;
  1078.  
  1079. PFILogin2RecHndl = ^PFILogin2RecPtr;
  1080. PFILogin2RecPtr = ^PFILogin2Rec;
  1081. PFILogin2Rec = PACKED RECORD
  1082.     async : Byte;
  1083.     command : Byte;
  1084.     result : Integer;
  1085.     networkID : Integer;
  1086.     nodeID : Byte;
  1087.     socketID : Byte;
  1088.     cmdBufferLength : Integer;
  1089.     cmdBufferPtr : Longint;
  1090.     replyBufferLen : Integer;
  1091.     replyBufferPtr : Longint;
  1092.     sessRefID : Byte;
  1093.     attnRtnAddr : Longint;
  1094.     serverName : Ptr;
  1095.     zoneName : Ptr;
  1096.     afpVersionNum : Integer;
  1097. END;
  1098.  
  1099. PFIListSessions2RecHndl = ^PFIListSessions2RecPtr;
  1100. PFIListSessions2RecPtr = ^PFIListSessions2Rec;
  1101. PFIListSessions2Rec = PACKED RECORD
  1102.     async : Byte;
  1103.     command : Byte;
  1104.     result : Integer;
  1105.     bufferLength : Integer;
  1106.     bufferPtr : Longint;
  1107.     entriesRtn : Byte;
  1108. END;
  1109.  
  1110. PFIGetSVersionRecHndl = ^PFIGetSVersionRecPtr;
  1111. PFIGetSVersionRecPtr = ^PFIGetSVersionRec;
  1112. PFIGetSVersionRec = PACKED RECORD
  1113.     async : Byte;
  1114.     command : Byte;
  1115.     result : Integer;
  1116.     sessRefID : Byte;
  1117.     afpVersionNum : Integer;
  1118. END;
  1119.  
  1120. ListSessionsBufferHndl = ^ListSessionsBufferPtr;
  1121. ListSessionsBufferPtr = ^ListSessionsBuffer;
  1122. ListSessionsBuffer = PACKED RECORD
  1123.     refNum : Byte;
  1124.     slotDrive : Byte;
  1125.     volName : PACKED ARRAY[1..28] OF CHAR;
  1126.     volID : Integer;
  1127. END;
  1128.  
  1129. RPMSetPrinterRecHndl = ^RPMSetPrinterRecPtr;
  1130. RPMSetPrinterRecPtr = ^RPMSetPrinterRec;
  1131. RPMSetPrinterRec = PACKED RECORD
  1132.     async : Byte; { asyncronous flag }
  1133.     command : Byte; { RPM command to execute }
  1134.     result : Integer; { error code returned from RPM operation }
  1135.     entityPtr : Longint; { pointer to the entity name }
  1136.     rpmFlags : Byte; { RPM operation flags }
  1137.     flushInterval : Integer; { flush interval }
  1138.     timeOut : Integer; { timeOut }
  1139.     numberBuffers : Integer; { number of buffers allocated }
  1140. END;
  1141.  
  1142. RPMCloseSessionRecHndl = ^RPMCloseSessionRecPtr;
  1143. RPMCloseSessionRecPtr = ^RPMCloseSessionRec;
  1144. RPMCloseSessionRec = PACKED RECORD
  1145.     async : Byte;
  1146.     command : Byte;
  1147.     result : Integer;
  1148. END;
  1149.  
  1150. RPMFlushSessionRecHndl = ^RPMFlushSessionRecPtr;
  1151. RPMFlushSessionRecPtr = ^RPMFlushSessionRec;
  1152. RPMFlushSessionRec = PACKED RECORD
  1153.     async : Byte;
  1154.     command : Byte;
  1155.     result : Byte;
  1156. END;
  1157.  
  1158. ZIPGetMyZoneRecHndl = ^ZIPGetMyZoneRecPtr;
  1159. ZIPGetMyZoneRecPtr = ^ZIPGetMyZoneRec;
  1160. ZIPGetMyZoneRec = PACKED RECORD
  1161.     async : Byte; { asyncronous flag }
  1162.     command : Byte; { ZIP Command to execute }
  1163.     result : Integer; { error result from a ZIP operation }
  1164.     completionPtr : Longint; { Pointer to the completion routine }
  1165.     bufferPtr : Longint; { pointe to the buffer }
  1166.     timeOut : Byte; { timeout interval for retrying }
  1167.     retry : Byte; { number of retries to attempt }
  1168.     reserved : Integer; { reserved for future use }
  1169. END;
  1170.  
  1171. ZIPGetZoneListRecHndl = ^ZIPGetZoneListRecPtr;
  1172. ZIPGetZoneListRecPtr = ^ZIPGetZoneListRec;
  1173. ZIPGetZoneListRec = PACKED RECORD
  1174.     async : Byte; { asyncronous flag }
  1175.     command : Byte; { ZIP command to execute }
  1176.     result : Integer; { error result from a ZIP operation }
  1177.     completionPtr : Longint; { pointer to the completion routine }
  1178.     bufferLength : Integer; { length of the user buffer }
  1179.     bufferPtr : Longint; { pointer to the user buffer }
  1180.     bridgeNodeID : Byte; { bridge node number }
  1181.     startIndex : Integer; { starting index of the buffer }
  1182.     timeOut : Byte; { timeout interval for retrying }
  1183.     retry : Byte; { number of retries to attempt }
  1184.     zonesFound : Integer; { number of zones found }
  1185.     reserved : Integer; { reserved for future use (not clear in manual) }
  1186. END;
  1187.  
  1188. CmdBlockHndl = ^CmdBlockPtr;
  1189. CmdBlockPtr = ^CmdBlock;
  1190. CmdBlock = RECORD
  1191.     cmdLength : Integer; { AFP Command Length }
  1192.     cmdBlkAddr : Ptr; { Address of AFP Command }
  1193.     replyLength : Integer; { Size of Reply Buffer }
  1194.     replyBuffer : Ptr; { Address of Reply Buffer }
  1195.     writeLength : Integer; { Size of Data to be written }
  1196.     writeBuffer : Ptr; { Address of Write Buffer }
  1197. END;
  1198.  
  1199. {
  1200.     Causes packet and timer interrupts to be buffered without
  1201.     being dispatched.  Use with completion routines, socket
  1202.     listeners, and in place of disabling interrupts.
  1203. }
  1204. PROCEDURE RamForbid; INLINE $E1101822;
  1205.  
  1206.  
  1207. {
  1208.     Reenables packet and timer interrupts. 
  1209.     Call after RamForbid.
  1210. }
  1211. PROCEDURE RamPermit; INLINE $E1101C22;
  1212.  
  1213.  
  1214. {
  1215.     AppleTalk calls return result value of type OSErr.
  1216.     This value is valid only for calls that are made syncronously.
  1217. }
  1218.  
  1219. FUNCTION  ASPCloseSession (VAR pBlockPtr:ASPCloseSessionRec) : OSErr ;
  1220.        INLINE $FA,$7A,$E1101422,$0183;
  1221. FUNCTION  ASPCommand (VAR pBlockPtr:ASPCommandRec) : OSErr ;
  1222.        INLINE $FA,$7A,$E1101422,$0183;
  1223. FUNCTION  ASPGetParms (VAR pBlockPtr:ASPGetParmsRec) : OSErr ;
  1224.        INLINE $FA,$7A,$E1101422,$0183;
  1225. FUNCTION  ASPGetStatus (VAR pBlockPtr:ASPGetStatusRec) : OSErr ;
  1226.        INLINE $FA,$7A,$E1101422,$0183;
  1227. FUNCTION  ASPOpenSession (VAR pBlockPtr:ASPOpenSessionRec) : OSErr ;
  1228.        INLINE $FA,$7A,$E1101422,$0183;
  1229. FUNCTION  ASPWrite (VAR pBlockPtr:ASPWriteRec) : OSErr ;
  1230.        INLINE $FA,$7A,$E1101422,$0183;
  1231. FUNCTION  ATBoot (VAR pBlockPtr:ATBootRecPtr) : OSErr ;
  1232.        INLINE $FA,$7A,$E1101422,$0183;
  1233. FUNCTION  ATCancelTimer (VAR pBlockPtr:ATCancelTimerRec) : OSErr ;
  1234.        INLINE $FA,$7A,$E1101422,$0183;
  1235. FUNCTION  ATGetGlobal (VAR pBlockPtr:ATGetGlobalRec) : OSErr ;
  1236.        INLINE $FA,$7A,$E1101422,$0183;
  1237. FUNCTION  ATGetInfo (VAR pBlockPtr:ATGetInfoRec) : OSErr ;
  1238.        INLINE $FA,$7A,$E1101422,$0183;
  1239. FUNCTION  ATInstallTimer (VAR pBlockPtr:ATInstallTimerRec) : OSErr ;
  1240.        INLINE $FA,$7A,$E1101422,$0183;
  1241. FUNCTION  ATPCancelReq (VAR pBlockPtr:ATPCancelReqRec) : OSErr ;
  1242.        INLINE $FA,$7A,$E1101422,$0183;
  1243. FUNCTION  ATPCloseSocket (VAR pBlockPtr:ATPCloseSocketRec) : OSErr ;
  1244.        INLINE $FA,$7A,$E1101422,$0183;
  1245. FUNCTION  ATPGetReq (VAR pBlockPtr:ATPGetReqRec) : OSErr ;
  1246.        INLINE $FA,$7A,$E1101422,$0183;
  1247. FUNCTION  ATPOpenSocket (VAR pBlockPtr:ATPOpenSocketRec) : OSErr ;
  1248.        INLINE $FA,$7A,$E1101422,$0183;
  1249. FUNCTION  ATPRelCB (VAR pBlockPtr:ATPRelCBRec) : OSErr ;
  1250.        INLINE $FA,$7A,$E1101422,$0183;
  1251. FUNCTION  ATPSendReq (VAR pBlockPtr:ATPSendReqRec) : OSErr ;
  1252.        INLINE $FA,$7A,$E1101422,$0183;
  1253. FUNCTION  ATPSendResp (VAR pBlockPtr:ATPSendRespRec) : OSErr ;
  1254.        INLINE $FA,$7A,$E1101422,$0183;
  1255. FUNCTION  ATRemoveTimer (VAR pBlockPtr:ATInstallTimerRec) : OSErr ;
  1256.        INLINE $FA,$7A,$E1101422,$0183;
  1257. FUNCTION  DDPCloseSocket (VAR pBlockPtr:DDPCloseSocketRec) : OSErr ;
  1258.        INLINE $FA,$7A,$E1101422,$0183;
  1259. FUNCTION  DDPOpenSocket (VAR pBlockPtr:DDPOpenSocketRec) : OSErr ;
  1260.        INLINE $FA,$7A,$E1101422,$0183;
  1261. FUNCTION  DDPSendDatagram (VAR pBlockPtr:DDPSendDatagramRec) : OSErr ;
  1262.        INLINE $FA,$7A,$E1101422,$0183;
  1263. FUNCTION  LAPAttachProt (VAR pBlockPtr:LAPAttachProtRec) : OSErr ;
  1264.        INLINE $FA,$7A,$E1101422,$0183;
  1265. FUNCTION  LAPReadBuffer (VAR pBlockPtr:LAPReadBufferRec) : OSErr ;
  1266.        INLINE $FA,$7A,$E1101422,$0183;
  1267. FUNCTION  LAPRemoveProt (VAR pBlockPtr:LAPRemoveProtRec) : OSErr ;
  1268.        INLINE $FA,$7A,$E1101422,$0183;
  1269. FUNCTION  LAPWrite (VAR pBlockPtr:LAPWriteRec) : OSErr ;
  1270.        INLINE $FA,$7A,$E1101422,$0183;
  1271. FUNCTION  NBPConfirmName (VAR pBlockPtr:NBPConfirmNameRec) : OSErr ;
  1272.        INLINE $FA,$7A,$E1101422,$0183;
  1273. FUNCTION  NBPKill (VAR pBlockPtr:NBPKillRec) : OSErr ;
  1274.        INLINE $FA,$7A,$E1101422,$0183;
  1275. FUNCTION  NBPLookupName (VAR pBlockPtr:NBPLookupNameRec) : OSErr ;
  1276.        INLINE $FA,$7A,$E1101422,$0183;
  1277. FUNCTION  NBPRegisterName (VAR pBlockPtr:NBPRegisterNameRec) : OSErr ;
  1278.        INLINE $FA,$7A,$E1101422,$0183;
  1279. FUNCTION  NBPRemoveName (VAR pBlockPtr:NBPRemoveNameRec) : OSErr ;
  1280.        INLINE $FA,$7A,$E1101422,$0183;
  1281. FUNCTION  PAPClose (VAR pBlockPtr:PAPCloseRec) : OSErr ;
  1282.        INLINE $FA,$7A,$E1101422,$0183;
  1283. FUNCTION  PAPOpen (VAR pBlockPtr:PAPOpenRec) : OSErr ;
  1284.        INLINE $FA,$7A,$E1101422,$0183;
  1285. FUNCTION  PAPRead (VAR pBlockPtr:PAPReadRec) : OSErr ;
  1286.        INLINE $FA,$7A,$E1101422,$0183;
  1287. FUNCTION  PAPStatus (VAR pBlockPtr:PAPStatusRec) : OSErr ;
  1288.        INLINE $FA,$7A,$E1101422,$0183;
  1289. FUNCTION  PAPUnload (VAR pBlockPtr:PAPUnloadRec) : OSErr ;
  1290.        INLINE $FA,$7A,$E1101422,$0183;
  1291. FUNCTION  PAPWrite (VAR pBlockPtr:PAPWriteRec) : OSErr ;
  1292.        INLINE $FA,$7A,$E1101422,$0183;
  1293. FUNCTION  PFIAccess (VAR pBlockPtr:PFIAccessRec) : OSErr ;
  1294.        INLINE $FA,$7A,$E1101422,$0183;
  1295. FUNCTION  PFIConvertTime (VAR pBlockPtr:PFIConvertTimeRec) : OSErr ;
  1296.        INLINE $FA,$7A,$E1101422,$0183;
  1297. FUNCTION  PFIGetSrcPath (VAR pBlockPtr:PFIGetSrcpathRec) : OSErr ;
  1298.        INLINE $FA,$7A,$E1101422,$0183;
  1299. FUNCTION  PFIGetSVersion (VAR pBlockPtr:PFIGetSVersionRec) : OSErr ;
  1300.        INLINE $FA,$7A,$E1101422,$0183;
  1301. FUNCTION  PFIHooks (VAR pBlockPtr:PFIHooksRec) : OSErr ;
  1302.        INLINE $FA,$7A,$E1101422,$0183;
  1303. FUNCTION  PFIListSessions (VAR pBlockPtr:PFIListSessionsRec) : OSErr ;
  1304.        INLINE $FA,$7A,$E1101422,$0183;
  1305. FUNCTION  PFIListSessions2 (VAR pBlockPtr:PFIListSessions2Rec) : OSErr ;
  1306.        INLINE $FA,$7A,$E1101422,$0183;
  1307. FUNCTION  PFILogin (VAR pBlockPtr:PFILoginRec) : OSErr ;
  1308.        INLINE $FA,$7A,$E1101422,$0183;
  1309. FUNCTION  PFILogin2 (VAR pBlockPtr:PFILogin2Rec) : OSErr ;
  1310.        INLINE $FA,$7A,$E1101422,$0183;
  1311. FUNCTION  PFILoginCont (VAR pBlockPtr:PFILoginContRec) : OSErr ;
  1312.        INLINE $FA,$7A,$E1101422,$0183;
  1313. FUNCTION  PFILogOut (VAR pBlockPtr:PFILogoutRec) : OSErr ;
  1314.        INLINE $FA,$7A,$E1101422,$0183;
  1315. FUNCTION  PFIMountVol (VAR pBlockPtr:PFIMountvolRec) : OSErr ;
  1316.        INLINE $FA,$7A,$E1101422,$0183;
  1317. FUNCTION  PFINaming (VAR pBlockPtr:PFINamingRec) : OSErr ;
  1318.        INLINE $FA,$7A,$E1101422,$0183;
  1319. FUNCTION  PFISetBuffer (VAR pBlockPtr:PFISetBufferRec) : OSErr ;
  1320.        INLINE $FA,$7A,$E1101422,$0183;
  1321. FUNCTION  PFITimeZone (VAR pBlockPtr:PFITimeZoneRec) : OSErr ;
  1322.        INLINE $FA,$7A,$E1101422,$0183;
  1323. FUNCTION  PFIUserPrefix (VAR pBlockPtr:PFIUserPrefixRec) : OSErr ;
  1324.        INLINE $FA,$7A,$E1101422,$0183;
  1325. FUNCTION  RPMCloseSession (VAR pBlockPtr:RPMCloseSessionRecPtr) : OSErr ;
  1326.        INLINE $FA,$7A,$E1101422,$0183;
  1327. FUNCTION  RPMFlushSession (VAR pBlockPtr:RPMFlushSessionRecPtr) : OSErr ;
  1328.        INLINE $FA,$7A,$E1101422,$0183;
  1329. FUNCTION  RPMSetPrinter (VAR pBlockPtr:RPMSetPrinterRecPtr) : OSErr ;
  1330.        INLINE $FA,$7A,$E1101422,$0183;
  1331. FUNCTION  ZIPGetMyZone (VAR pBlockPtr:ZIPGetMyZoneRec) : OSErr ;
  1332.        INLINE $FA,$7A,$E1101422,$0183;
  1333. FUNCTION  ZIPGetZoneList (VAR pBlockPtr:ZIPGetZoneListRec) : OSErr ;
  1334.        INLINE $FA,$7A,$E1101422,$0183;
  1335.  
  1336. IMPLEMENTATION
  1337.  
  1338. END.
  1339.